{% extends "single.html" %}
{% block title %}{{ page_title }}{% endblock %}
{% block styles %}
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}styles/settings.css">
{% endblock %}
{% block main %}
    <div class="message">
        {% if messages %}
        <ul class="messages">
            {% for message in messages %}
                <li>{{ message }}</li>
            {% endfor %}
        </ul>   
        {% endif %}
    </div>
    <form method="post" action="." enctype="multipart/form-data">
    {% csrf_token %}
        <p><input type="hidden" name="next" value="/" /></p>
        <p><img src="{{ avatar_url }}" class="img_avatar" alt="我的头像" /></p>
        <p>
            <label for="id_avatar">头像：</label> {{ form.avatar }}
            {% if form.avatar.errors %}
                <strong>
                {% for error in form.avatar.errors %}
                    {{ error|escape }}
                {% endfor %}
                </strong>
            {% endif %}
        </p>
        <p>
            <label for="id_nickname">昵称：</label>{{ form.nickname }}
            {% if form.nickname.errors %}
                <strong>
                {% for error in form.nickname.errors %}
                    {{ error|escape }}
                {% endfor %}
                </strong>
            {% endif %}
        </p>
        <p>
            <label for="id_password">密码：</label> {{ form.password }}
            {% if form.password.errors %}
                <strong>
                {% for error in form.password.errors %}
                    {{ error|escape }}
                {% endfor %}
                </strong>
            {% endif %}
        </p>
        <p>
            <label for="id_homepage">主页：</label> {{ form.homepage }}
            {% if form.homepage.errors %}
                <strong>
                {% for error in form.homepage.errors %}
                    {{ error|escape }}
                {% endfor %}
                </strong>
            {% endif %}
        </p>
        <p>
            <label for="id_about">关于：</label> <br />{{ form.about }}
            {% if form.about.errors %}
                <strong>
                {% for error in form.about.errors %}
                    {{ error|escape }}
                {% endfor %}
                </strong>
            {% endif %}
        </p>
        <p><input type="submit" value="修改" class="modify"/></p>
    </form>
{% endblock %}



        


    
